package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OmsOrderProductMapper;
import com.ruoyi.system.domain.OmsOrderProduct;
import com.ruoyi.system.service.IOmsOrderProductService;

/**
 * 订单-商品关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-29
 */
@Service
public class OmsOrderProductServiceImpl implements IOmsOrderProductService 
{
    @Autowired
    private OmsOrderProductMapper omsOrderProductMapper;

    /**
     * 查询订单-商品关联
     * 
     * @param omsOrderProductId 订单-商品关联主键
     * @return 订单-商品关联
     */
    @Override
    public OmsOrderProduct selectOmsOrderProductByOmsOrderProductId(Long omsOrderProductId)
    {
        return omsOrderProductMapper.selectOmsOrderProductByOmsOrderProductId(omsOrderProductId);
    }

    /**
     * 查询订单-商品关联列表
     * 
     * @param omsOrderProduct 订单-商品关联
     * @return 订单-商品关联
     */
    @Override
    public List<OmsOrderProduct> selectOmsOrderProductList(OmsOrderProduct omsOrderProduct)
    {
        return omsOrderProductMapper.selectOmsOrderProductList(omsOrderProduct);
    }

    /**
     * 新增订单-商品关联
     * 
     * @param omsOrderProduct 订单-商品关联
     * @return 结果
     */
    @Override
    public int insertOmsOrderProduct(OmsOrderProduct omsOrderProduct)
    {
        return omsOrderProductMapper.insertOmsOrderProduct(omsOrderProduct);
    }

    /**
     * 修改订单-商品关联
     * 
     * @param omsOrderProduct 订单-商品关联
     * @return 结果
     */
    @Override
    public int updateOmsOrderProduct(OmsOrderProduct omsOrderProduct)
    {
        return omsOrderProductMapper.updateOmsOrderProduct(omsOrderProduct);
    }

    /**
     * 批量删除订单-商品关联
     * 
     * @param omsOrderProductIds 需要删除的订单-商品关联主键
     * @return 结果
     */
    @Override
    public int deleteOmsOrderProductByOmsOrderProductIds(Long[] omsOrderProductIds)
    {
        return omsOrderProductMapper.deleteOmsOrderProductByOmsOrderProductIds(omsOrderProductIds);
    }

    /**
     * 删除订单-商品关联信息
     * 
     * @param omsOrderProductId 订单-商品关联主键
     * @return 结果
     */
    @Override
    public int deleteOmsOrderProductByOmsOrderProductId(Long omsOrderProductId)
    {
        return omsOrderProductMapper.deleteOmsOrderProductByOmsOrderProductId(omsOrderProductId);
    }
}
